package com.example.doctorstation.POJOController;

import com.example.doctorstation.Config.MyResponse;
import com.example.doctorstation.Helper.StringHelper;
import com.example.doctorstation.POJOData.PatientInfo;
import com.example.doctorstation.POJOMapper.PatientInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class PatientInfoController {
    @Autowired
    PatientInfoMapper patientInfoMapper;

    @GetMapping(value="/patientinfo")
    public MyResponse getAllBedsByDepartName(PatientInfo info) {
        try {
            return new MyResponse(patientInfoMapper.getPatientInfo(info.getPatientID()), "查询到该病人！", "该医院不存在该病人");
        } catch (Throwable e) {
            e.printStackTrace();
            return new MyResponse();
        }
    }
}
